<%= scrivito_large_dialog do %>
  <ul class="tab-list">
    <li class="active" data-panel-target="#edit-general">General</li>
    <li data-panel-target="#edit-tags">Tags</li>
    <li data-panel-target="#edit-activity">Activity</li>
    <li data-panel-target="#edit-event">Event</li>
    <li data-panel-target="#edit-dynamic">Add fields</li>
  </ul>

  <div class="tab-panels">
    <div class="tab-panel" id="edit-general">
      <%= scrivito_details_for t('scrivito_crm_form_widget.details.subject', default: 'Subject') do %>
        <%= scrivito_tag :div, widget, :subject %>
      <% end %>
      <%= scrivito_details_for t('scrivito_crm_form_widget.details.redirect_to', default: 'Redirect after submit') do %>
        <%= scrivito_tag :div, widget, :redirect_to %>
      <% end %>

      <%= scrivito_details_for t('scrivito_crm_form_widget.details.submit_button_text', default: 'Text on submit button') do %>
        <%= scrivito_tag :div, widget, :submit_button_text %>
      <% end %>
    </div>

    <div class="tab-panel" id="edit-tags">
      <%= scrivito_details_for t('scrivito_crm_form_widget.details.tags', default: 'Tags') do %>
        <%= scrivito_tag :div, widget, :tags %>
      <% end %>
      <%= scrivito_colapsable_for 'What is this for?', 'help small mark' do %>
        Optional attribute. Can be used to add tags to a contact like has_visited_event. Contatc will be calculated by the custom attributes email and last_name of your selected activtiy. If one of this fields at the crm activity do not exist, this attribute has no effect.
      <% end %>
    </div>

    <div class="tab-panel" id="edit-activity">
      <%= scrivito_details_for t('scrivito_crm_form_widget.details.activity', default: 'Activity') do %>
        <%= scrivito_tag(:div, widget, :activity_id, data: {toggle_button_list: CrmFormWidget.activity_ids}) %>
      <% end %>
    </div>

    <div class="tab-panel" id="edit-event">
      <%= scrivito_details_for t('scrivito_crm_form_widget.details.event', default: 'Event') do %>
        <%= scrivito_tag(:div, widget, :event_id, data: {
          toggle_button_list: CrmFormWidget.event_ids,
          toggle_button_caption: CrmFormWidget.event_names }) %>
      <% end %>
    </div>

    <div class="tab-panel" id="edit-dynamic">
      <%= scrivito_tag :div, widget, :dynamic_attributes %>
    </div>
  </div>
<% end %>